package com.itboye.hutouben.logincontroller;

import android.app.Activity;
import android.content.Intent;
import android.util.Log;

import com.itboye.hutouben.activity.addressmanage.AddressListActivity;
import com.itboye.hutouben.activity.message.MessageActivity;
import com.itboye.hutouben.activity.message.RepairMessActivity;
import com.itboye.hutouben.activity.message.SystemMessActivity;
import com.itboye.hutouben.activity.mysetting.PersonalActivity;
import com.itboye.hutouben.activity.mysetting.QianDaoActivity;
import com.itboye.hutouben.activity.mysetting.WeiXiuRecord;
import com.itboye.hutouben.activity.qianbao.MyQianBaoActivity;
import com.itboye.hutouben.activity.qianbao.ZhiFuPassActivity;
import com.itboye.hutouben.activity.signin.SignInShowActivity;
import com.itboye.hutouben.activity.store.OrderActivity;
import com.itboye.hutouben.activity.store.ShopCartActivity;
import com.itboye.hutouben.base.MyApplcation;
import com.itboye.hutouben.util.IsUtilUid;


/***
 * @author 在登录状态下执行该方法
 */
public class LoginedState implements ILoginState {
    /**
     * 查看个人资料
     */
    @Override
    public void onPersonal(Activity activity, Object obj) {
        // TODO Auto-generated method stub
        Intent intent = new Intent(activity, PersonalActivity.class);
            activity.startActivity(intent);
        Log.d("titleltsssss","sbsbsb");
    }

    /**
     * 我的钱包
     */
    @Override
    public void onQiaoBao(Activity activity, Object obj) {
        String  pwd= IsUtilUid.isPwd();
        if(pwd==null || pwd==""){
            Intent intent=new Intent(MyApplcation.ctx,ZhiFuPassActivity.class);
            activity.startActivity(intent);
        }else{
            Intent intent = new Intent(activity, MyQianBaoActivity.class);
            activity.startActivity(intent);
        }
    }

    /**
     * 我的订单
     */
    @Override
    public void onDingDan(Activity activity, Object obj) {
        Intent intent = new Intent(activity, OrderActivity.class);
        activity.startActivity(intent);
    }

    /**
     * 维修记录
     */
    @Override
    public void onWeiXiuJiLu(Activity activity, Object obj) {
        Intent intent = new Intent(activity, WeiXiuRecord.class);
        activity.startActivity(intent);
    }

    /**
     * 收货地址
     */
    @Override
    public void onShouHuoDiZhi(Activity activity, Object obj) {
        Intent intent = new Intent(activity, AddressListActivity.class);
        intent.putExtra("type","2");
        activity.startActivity(intent);
    }

    /**
     * 系统消息
     */
    @Override
    public void onXiTongMessage(Activity activity, Object obj) {
        Intent intent = new Intent(activity, SystemMessActivity.class);
        activity.startActivity(intent);
    }
    /**
     * 维修消息
     */
    @Override
    public void onWeiXiuMessage(Activity activity, Object obj) {
        Intent intent = new Intent(activity, RepairMessActivity.class);
        activity.startActivity(intent);
    }
    /**
     * 购物车
     */
    @Override
    public void onGouWuChe(Activity activity, Object obj) {
        Intent intent = new Intent(activity, ShopCartActivity.class);
        activity.startActivity(intent);
    }
    /**
     * 消息
     */
    @Override
    public void onXiaoXi(Activity activity, Object obj) {
        Intent intent = new Intent(activity, MessageActivity.class);
        activity.startActivity(intent);
    }
    /**
     * 签到记录
     */
    @Override
    public void onQianDao(Activity activity, Object obj) {
        Intent intent = new Intent(activity, SignInShowActivity.class);
        activity.startActivity(intent);
    }


}
